package com.contextor.magiccards.services.battle;

import com.contextor.magiccards.dao.battle.BattleDao;
import com.contextor.magiccards.dao.utils.Pager;
import com.contextor.magiccards.model.battle.Battle;
import com.contextor.magiccards.model.battle.BattleStatus;
import com.contextor.magiccards.model.character.Personage;
import com.contextor.magiccards.model.user.User;
import com.contextor.magiccards.services.BaseEntityService;

import java.util.List;

/**
 * User: Sergey
 * Date: 20.03.2011 11:11:07
 */
public interface BattleService extends BaseEntityService<Battle, BattleDao> {
    /**
     * search for battle created by user
     *
     * @param user   - owner
     * @param status - current status
     * @return Battle - battle
     */
    Battle findOwnerWithStatus(User user, BattleStatus status);

    /**
     * list battles with certain status
     *
     * @param shard     - shard of current user
     * @param uid       - uid of current user
     * @param status    - current status
     * @param pager     - pager
     * @param personage - personage
     * @return Battle - battle
     */
    List<Battle> findWithStatus(int shard, String uid, BattleStatus status, Pager pager, Personage personage);

}
